#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
    char ch1[10] = {0};
    char ch2[10] = {0};
    char ch3[10] = {0};
    scanf("%s %s %s", ch1,ch2,ch3);
    if (strcmp(ch1, ch2) > 0)
    {
        if (strcmp(ch1, ch3) > 0)
        {
            if (strcmp(ch2, ch3) > 0)
            {
                printf("%s\n%s\n%s\n", ch3, ch2, ch1);
            }
            else
            {
                printf("%s\n%s\n%s\n", ch2, ch3, ch1);
            }
        }
        else
        {
            printf("%s\n%s\n%s\n", ch2, ch1, ch3);
        }
    }
    else
    {
        if (strcmp(ch2, ch3) > 0)
        {
            if (strcmp(ch1, ch3) > 0)
            {
                printf("%s\n%s\n%s\n", ch3, ch1, ch2);
            }
            else
            {
                printf("%s\n%s\n%s\n", ch1, ch3, ch2);
            }
        }
        else
        {
            printf("%s\n%s\n%s\n", ch1, ch2, ch3);
        }
    }
    return 0;
}